package com.example.b_308.myapplication.model.base;




import java.io.Serializable;

/**
 * Created by tongkang on 2017/10/31.
 */

public class BaseApply extends BaseModel implements Serializable {
    //    100:等待审批 200:申请通过 300:申请未通过 400:取消
    public final static int WAIT = 100;
    public final static int SUC = 200;
    public final static int FAIL = 300;
    public final static int CANCEL = 400;
    public final static String APPLY = "apply";
    /**
     * 申请ID
     */
    String id;
    /**
     * 申请开始时间
     */
    String begin_time;
    /**
     * 公司ID
     */
    String company_id;
    /**
     * 申请结束时间
     */
    String end_time;
    /**
     * 申请总时长（小时）
     */
    String during;
    /**
     * 申请内容
     */
    String content;
    /**
     * 申请状态
     */
    int status;
    /**
     * 申请类型
     */
    int apply_type;
    /**
     * 申请人
     */
    String applicant_id;
    /**
     * 审批人
     */
    String approver_id;
    /**
     * 审批时间
     */
    String approver_time;
    /**
     * 创建时间
     */
    String create_time;
    /**
     *
     */
    String text;

    public BaseApply() {
    }

    public BaseApply(String id) {
        setId(id);
    }

    public String getId() {
        if (null == id) {
            id = getStr("id");
        }
        return id;
    }

    public String getBegin_time() {
        if (null == begin_time) {
            begin_time = getStr("begin_time");
        }
        return getStr("begin_time");

    }

    public String getCompany_id() {
        if (null == company_id)
            company_id = getStr("company_id");
        return company_id;
    }

    public String getEnd_time() {
        if (null == end_time)
            end_time = getStr("end_time");
        return end_time;
    }

    public String getDuring() {
        if (null == during)
            during = getStr("during");
        return during;
    }

    public String getContent() {
        if (null == content)
            content = getStr("content");
        return content;
    }

    public int getStatus() {
        if (0 > status)
            status = getInt("status", WAIT);
        return status;
    }

    public int getApply_type() {
        if (0 > apply_type)
            apply_type = getInt("apply_type", -1);
        return apply_type;
    }

    public String getApplicant_id() {
        if (null == applicant_id)
            applicant_id = getStr("applicant_id");
        return applicant_id;
    }

    public String getApprover_id() {
        if (null == approver_id)
            approver_id = getStr("approver_id");
        return approver_id;
    }

    public String getApprover_time() {
        if (null == approver_time)
            approver_time = getStr("approver_time");
        return approver_time;
    }

    public String getCreate_time() {
        if (null == create_time)
            create_time = getStr("create_time");
        return create_time;
    }

    public String getText() {
        if (null == text)
            text = getStr("text");
        return text;
    }

    public void setId(String id) {

        put("id", id);
        this.id = id;
    }

    public void setBegin_time(String begin_time) {

        put("begin_time", begin_time);
        this.begin_time = begin_time;
    }

    public void setCompany_id(String company_id) {
        put("company_id", company_id);
        this.company_id = company_id;
    }

    public void setEnd_time(String end_time) {
        put("end_time", end_time);
        this.end_time = end_time;
    }

    public void setDuring(String during) {

        put("during", during);
        this.during = during;
    }

    public void setContent(String content) {

        put("content", content);
        this.content = content;
    }

    public void setStatus(int status) {

        put("status", status);
        this.status = status;
    }

    public void setApply_type(int apply_type) {

        put("apply_type", apply_type);
        this.apply_type = apply_type;
    }

    public void setApplicant_id(String applicant_id) {
        this.put("applicant_id", applicant_id);
        this.applicant_id = applicant_id;
    }

    public void setApprover_id(String approver_id) {
        put("approver_id", approver_id);
        this.approver_id = approver_id;
    }

    public void setApprover_time(String approver_time) {

        put("approver_time", approver_time);
        this.approver_time = approver_time;
    }

    public void setCreate_time(String create_time) {

        put("create_time", create_time);
        this.create_time = create_time;
    }

    public void setText(String text) {

        put("text", text);
        this.text = text;
    }
}
